package com.hatricks.algorithm.leetcode.circularlinkedlist_142;

/**
 * Definition for singly-linked list.
 * class ListNode {
 * int val;
 * ListNode next;
 * ListNode(int x) {
 * val = x;
 * next = null;
 * }
 * }
 *
 * @author hatricks
 * @link https://leetcode-cn.com/problems/linked-list-cycle-ii/
 */
public class Solution {
    public ListNode detectCycle(ListNode head) {

        return head;
    }

    static class ListNode {
        int val;
        ListNode next;

        ListNode() {
        }

        ListNode(int val) {
            this.val = val;
        }

        ListNode(int val, ListNode next) {
            this.val = val;
            this.next = next;
        }
    }

}